﻿@model ScmSpecialpersonnelViewModel
@{
    Layout = null;
    ViewBag.Title = "特种作业人员-修改";
}
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
<script type="text/javascript">
    function dialogRefresh(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            $("#pagerForm", navTab.getCurrentPanel()).submit();
            $.pdialog.closeCurrent();
        }
    }
</script>
@using (Html.BeginForm("SpecialPersonnelEditData", "ScmSpecialPersonnel", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,dialogRefresh);", @class = "pageForm required-validate" }))
{
    <div class="pageFormContent sortDrag" layouth="60">
        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_ID, new { @type = "hidden" })
        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_Section, new { @type = "hidden" })
        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_ConstructionID, new { @type = "hidden" })
        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_ConstructionName, new { @type = "hidden" })
            <table class="tab01 tabNo" width="100%;">
                <tr style="display: none">
                    <td class="td1" style="width: 25%;">操作人：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_OperateUserName, new { @type = "hidden", @class = "input02" })
                    </td>
                </tr>
                <tr style="display: none">
                    <td class="td1">操作时间：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_OperateTime, new { @type = "hidden", Value = DateTime.Now, @class = "input02" })
                    </td>
                </tr>
                <tr>
                    <td class="td1" style="width: 25%;">姓名：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_Name, new Dictionary<string, object> { { "class", "data-val-required input02" } })
                        @Html.ValidationMessageFor(model => model.TheSpecialpersonnelInfo.Sp_Name)
                    </td>
                </tr>
                <tr>
                    <td class="td1">性别：</td>
                    <td>
                        @Html.DropDownListFor(model => model.TheSpecialpersonnelInfo.Sp_Sex, ViewBag.list as IEnumerable<SelectListItem>)
                    </td>
                </tr>
                <tr>
                    <td class="td1">工种：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_Work, new { @class = "input02" })
                    </td>
                </tr>
                <tr>
                    <td class="td1">证书编号：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_CertificateNumb, new { @class = "input02" })
                    </td>
                </tr>
                <tr>
                    <td class="td1">发证时间：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_CertificateDate, new { @class = "date input02", Value = Model.TheSpecialpersonnelInfo.Sp_CertificateDate == null ? "" : Convert.ToDateTime(Model.TheSpecialpersonnelInfo.Sp_CertificateDate).ToString("yyyy-MM-dd") })
                    </td>
                </tr>

                <tr>
                    <td class="td1">有效期：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_ValidityDate, new { @class = "date input02", Value = Model.TheSpecialpersonnelInfo.Sp_ValidityDate == null ? "" : Convert.ToDateTime(Model.TheSpecialpersonnelInfo.Sp_ValidityDate).ToString("yyyy-MM-dd") })
                    </td>
                </tr>


                <tr>
                    <td class="td1">进场时间：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_EnterDate, new { @class = "date input02", Value = Model.TheSpecialpersonnelInfo.Sp_EnterDate == null ? "" : Convert.ToDateTime(Model.TheSpecialpersonnelInfo.Sp_EnterDate).ToString("yyyy-MM-dd") })
                    </td>
                </tr>
                <tr>
                    <td class="td1">退场时间：</td>
                    <td>
                        @Html.TextBoxFor(model => model.TheSpecialpersonnelInfo.Sp_ExitDate, new { @class = "date input02", Value = Model.TheSpecialpersonnelInfo.Sp_ExitDate == null ? "" : Convert.ToDateTime(Model.TheSpecialpersonnelInfo.Sp_ExitDate).ToString("yyyy-MM-dd") })
                    </td>
                </tr>
            </table>
    </div>

    <div class="formBar">
        <ul>
            <li>
                <button type="submit" class="btn btn-sm">保存</button>
            </li>
            <li>
                <button type="button" class="close btn btn-default btn-sm">取消</button>
            </li>
        </ul>
    </div>

}

